/*
 * @Description: 表格工具栏配置
 * @Author: HuiSir<https://gitee.com/huisir001>
 * @Date: 2025-07-28 21:55:31
 * @LastEditTime: 2025-08-01 10:33:42
 */
import { defineToolsOptions } from "@/components/TablePage/predefined";
import useSearchOptions from "./useSearchOptions";
import { delReqLogs } from "@/api/monitor/index";

export default defineToolsOptions(() => ({
  tools: ["delete", "search", "export", "refresh", "cols"],
  searchFormParams: {
    userId: "",
    username: "",
    ip: "",
    dateRange: "",
  },
  searchFormOptions: useSearchOptions(),
  delRequest: delReqLogs,
  getParamsBeforeDelete(selection) {
    return selection.map((item) => item.id).join(",");
  },
}));
